<script type="text/javascript" src="<?=base_url();?>assets/rte/richtext.js"></script>
<script type="text/javascript">
function some_function(){
if(document.getElementById('brose').value=='Video')
document.getElementById('video_preview').style.display='';
else
document.getElementById('video_preview').style.display='none';
}
</script>

<h4><center><? if(isset($message)): echo $message; endif; ?>
<? if(isset($error)): echo $error; endif; ?>
</center></h4>
<?php $form=array('name'=>'upload' ,'onsubmit' => "return submitForm();") ?>
<?
echo form_open_multipart($url,$form) ?>

	
<table>
	<tr>
		<td>Select Media:</td>
		<td align='left'>
		<?=form_radio('media', 'Interview', TRUE) ?>Interview	 
		<?=form_radio('media', 'Gossips', FALSE) ?>Gossips</td>
	</tr>
	<tr>
		<td>Person Name:</td>
		<td  align='left'><?=form_input('username') ?></td>
	</tr>
	<tr>
		<td>Description:</td>
		<td align='left'><? if(isset($jslinks1)){ echo $jslinks1['1']; echo $jslinks1['2'];} else{?><textarea name='description' id ='description'></textarea></td><?} ?>
	</tr>
	<tr>
		<td id="vidimage">Media:</td>
		<?php $options=array('Image'=>'Image',
							'Video'=>'Video',
		); 
		$js = "id = 'brose' onChange='some_function()'";?>
		<td align='left'><?=form_dropdown('brose',$options,'Image',$js)?>
		<?php $upload=array( 'name' => 'mediafile'); ?>
		<?=form_upload($upload)?></td>
	</tr>
	<tr style="display:none;" id="video_preview">
	<?php $vimage=array('name'=>'preview_image') ?>
		<td></td>
		<td align='left'>Preview image<?=form_upload($vimage) ?></td>
	</tr>
	<tr> 
		<td>Active video:</td>
		<td align='left'><?=form_checkbox('active_video', '1') ?></td>
	</tr>
	<tr> 
		<td>Active:</td>
		<td align='left'><?=form_checkbox('active', '0', TRUE) ?></td>
	</tr>
	<tr>
		<td>On date:</td>
		<td align='left'><?=form_input('date') ?>[Ex:yyyy-mm-dd]</td>
	</tr>
	<tr>
		<td colspan='2' align='right'><input type='submit' value='Insert'></td>
	</tr>
	<tr>
	</tr>

</table>
<?=form_close() ?>
